Today, various operating systems (OS) and graphics apparatus have been developed to support portable devices, namely portable electronic devices. Typically, a graphics apparatus for a portable device includes one or more graphics engines and/or one or more graphics libraries, such as Open Graphics Library (OpenGL). These graphics engines and/or libraries can be called by various applications running on an OS of the portable device, to generate graphical image data to be presented to a user via a graphical display arrangement of the portable device.
FIG. 1 is a schematic illustration of a known conventional graphics apparatus for a portable device; FIG. 1 represents prior art. The conventional graphics apparatus may, for example, be used by a software application 102 running on an OS of the portable device to present graphical image data to a user.
With reference to FIG. 1, the conventional graphics apparatus includes a graphics engine 104, a graphics library 106, one or more temporary buffers 108, also known as “framebuffers” to a person skilled in the art, a final buffer 110, a graphics driver 112, graphics hardware 114, and a display 116. The graphics engine 104, the graphics library 106, the one or more temporary buffers 108 and the final buffer 110 may reside in an OS space, as shown in FIG. 1. The graphics driver 112 may be software-enabled in a kernel space. The graphics driver 112 is interfaced with the display 116 via the graphics hardware 114. The graphics hardware 114 may, for example, be an integrated graphics chipset or a dedicated graphics processing unit (GPU). The display 116 may, for example, be a pixel display, such as a touch screen display of the portable device.
In an example, the software application 102 is a gaming application or similar that requires generation and presentation of graphical image data during playing of a game. Moreover, in the example, the software application 102 makes one or more function calls to the graphics engine 104 to generate the graphical image data.
Upon receiving the function calls, the graphics engine 104 computes how to present the state of the software application in graphics and sends one or more corresponding function calls to the graphics library 106, which then generates or modifies the graphical image data in one or more temporary buffers 108. Once all graphical image data for presenting one frame of graphics in the application has been fully generated in one or more temporary buffers, the graphics library 106 composites the temporary buffers together to create the final buffer 110, which may be a new buffer, or one of the temporary buffers. In a situation wherein only one temporary buffer has been generated to present the one frame of graphics, that temporary buffer can be used as the final buffer 110.
Subsequently, the graphical image data in the final buffer 110 is provided to the graphics driver 112. The graphics driver 112 then controls the graphics hardware 114 and/or the display 116 to present the image to the user. When a plurality of image frames per second are presented to the user, the user perceives these image frames combining together to create the effect of moving images on the display 116.
The graphics engine 104 acts as an interface between the software application 102 and the graphics apparatus. It is to be noted here that the graphics engine 104 is typically a part of the software application 102. For example, the graphics engine 104 is simply a routine of the software application 102 calling the graphics library 106. Alternatively, the graphics engine 104 is a full-featured sub-program of the software application 102 responsible for generating or modifying the graphical image data, and/or performing digital image processing on the graphical image data.
The graphics engine 104 may be created by an author of the software application 102, licensed from a third party, or provided by the operating system vendor. In many instances, the software application 102 and/or the graphics engine 104 are not operable to provide any interface to capture the graphical image data generated by the known graphics apparatus.
A conventional technique for facilitating such graphical image data capturing requires modifying the software application 102 and/or the graphics engine 104 to include graphical image data capturing capabilities. For this purpose, an additional software module has to be included as a part of the software application 102. In addition, the graphics engine 104 has to be modified to call the additional software module to capture the graphical image data during the execution of the software application 102.
However, this conventional technique suffers from several disadvantages. Firstly, the software application 102 and/or the graphics engine 104 are required to be modified extensively. Secondly, making such extensive modifications is difficult, time consuming and tedious. Thirdly, in instances where the graphics engine 104 is licensed from a third party, source code of the graphics engine 104 is often closed, and, therefore, cannot be modified by the author of the software application 102. Moreover, the conventional technique is potentially susceptible to result in performance degradation when generating graphical images
Another conventional technique for facilitating graphics capturing requires using a third-party software application that has graphics capturing capabilities. However, such third-party software applications are often not suitable for portable devices, due to sandboxing of software applications in the portable devices enforced by operating systems such as Apple iOS and Google Android. The term “sandboxing” refers to a software security practice that prevents a software application from reading data of another software application.
Furthermore, some operating systems may themselves have graphical image data capturing capabilities as a standard feature. However, such graphical image data capturing capabilities are usually not provided in operating systems designed for portable devices.
Therefore, there exists a need for a graphics apparatus for a portable device that is capable of facilitating graphical image data capturing.